/*
 * Created: 2022-08-25 13:23:05
 * Author : 涛涛涛
 */

import React, { useContext } from 'react';
import { View, Text, Image } from '@tarojs/components';
import { styled } from 'linaria/react';
import { useClassName } from '@/utils/index';
import { ProductItemContext } from '@/pages/Home/ProductList/ProductItem/ProductItemContext';
import ProductImg from '@/pages/components/ProductImg/ProductImg';
export interface IProps extends ICompProps {}
Body.defaultProps = {} as Partial<IProps>;
function Body(props: IProps) {
    const { className } = props;
    const localClassName = useClassName('Body', className);
    const { artwork } = useContext(ProductItemContext);
    return (
        <RootView className={localClassName} style={props.style}>
            <ProductImg src={artwork.iconUrl}></ProductImg>
        </RootView>
    );
}
export default React.memo(Body);
const RootView = styled(View)`
    &.Body {
        width: 675px;
        height: 450px;
        overflow: hidden;
    }
`;
